package us.styx.net.packet;

import java.io.IOException;

import us.styx.net.Client;
import us.styx.net.codec.LoginProtocolDecoder;

public class PacketHandler {
    
    public static void processPackets(Client client) throws IOException {
	if (client == null) {
	    System.out.println("FUCK!");
	    System.exit(0);
	}
	if (!client.isLoggedIn()) {
	    client.setProtocolDecoder(new LoginProtocolDecoder());
	    client.getProtocolDecoder().decode(client);
	}
    }
}